home *** CD-ROM | disk | FTP | other *** search
-
- #ifndef __UDPLIB__
- #define __UDPLIB__
-
- #ifndef __MACTCPCOMMONTYPES__
- #include <MacTCPCommonTypes.h>
- #endif
- #ifndef __UDPPB__
- #include <UDPPB.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #define WDS(bufCount) struct { \
- wdsEntry block[bufCount]; \
- unsigned short zero; \
- }
-
- StreamPtr udpCreate(int bufSize, udp_port* local, UDPNotifyProc asr, Ptr usrData);
- OSErr udpRead(StreamPtr stream, void* buffer, short* len);
- OSErr udpWrite(StreamPtr stream, void* buffer, short len, ip_addr host, udp_port port);
- OSErr udpWriteWDS(StreamPtr stream, wdsEntry* wds, ip_addr host, udp_port port);
- OSErr udpRelease(StreamPtr stream);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-